﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UpdateEmployeeControl.ascx.cs" Inherits="Control_UpdateEmployeeControl" %>

<table>
    <tr>
        <td><asp:Label ID="Label3" runat="server" Text="LoginName: "></asp:Label></td>
        <td><asp:TextBox ID="txtLoginName" runat="server" Width="177px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtLoginName" Display="Dynamic" 
                ErrorMessage="LoginName Not Null"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txtLoginName" 
                ErrorMessage="LoginName can not have special character" 
                ValidationExpression="(^[a-zA-Z0-9 ]{1,})$"></asp:RegularExpressionValidator>
        </td>
    </tr>

    <tr>
        <td><asp:Label ID="Label2" runat="server" Text="FullName: "></asp:Label></td>
        <td><asp:TextBox ID="txtFullNameEmployee" runat="server" Width="177px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtFullNameEmployee" Display="Dynamic" 
                ErrorMessage="Name Not Null"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                ControlToValidate="txtFullNameEmployee" 
                ErrorMessage="Name can not have special character" 
                ValidationExpression="(^[a-zA-Z0-9 ]{1,})$"></asp:RegularExpressionValidator>
        </td>
    </tr>

    <tr>
        <td><asp:Label ID="Label4" runat="server" Text="Age: "></asp:Label></td>
        <td><asp:TextBox ID="txtAge" runat="server" Width="177px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtAge" Display="Dynamic" ErrorMessage="Age Not Null"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                ControlToValidate="txtAge" ErrorMessage="Please Fill in your Age" 
                ValidationExpression="^[1-9][0-9]?$"></asp:RegularExpressionValidator>
        </td>
    </tr>

    <tr>
        <td><asp:Label ID="Label1" runat="server" Text="Sex: "></asp:Label></td>
        <td style="margin-left: 80px">
            <asp:DropDownList ID="DropDownList1" runat="server">
                <asp:ListItem>Male</asp:ListItem>
                <asp:ListItem>FeMale</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
     
    <tr>
        <td><asp:Label ID="Label11" runat="server" Text="Address: "></asp:Label></td>
        <td><asp:TextBox ID="txtAddress" runat="server" Width="177px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                ControlToValidate="txtAddress" Display="Dynamic" 
                ErrorMessage="Address Not Null"></asp:RequiredFieldValidator>
        </td>
    </tr>
    
    <tr>
        <td><asp:Label ID="Label6" runat="server" Text="Phone: "></asp:Label></td>
        <td><asp:TextBox ID="txtPhone" runat="server" Width="177px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ControlToValidate="txtPhone" Display="Dynamic" ErrorMessage="Phone Not Null"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                ControlToValidate="txtPhone" ErrorMessage="Please fill in the right phone" 
                ValidationExpression="0\d{9,10}"></asp:RegularExpressionValidator>
        </td>
    </tr>

    <tr>
        <td><asp:Label ID="Label5" runat="server" Text="Email: "></asp:Label></td>
        <td><asp:TextBox ID="txtEmail" runat="server" Width="177px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="Email Not Null"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                ControlToValidate="txtEmail" ErrorMessage="Please fill in the right email" 
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        </td>
    </tr>

    <tr>
        <td><asp:Label ID="Label7" runat="server" Text="Qualification: "></asp:Label></td>
        <td><asp:TextBox ID="txtQualification" runat="server" Width="177px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                ControlToValidate="txtQualification" Display="Dynamic" 
                ErrorMessage="Qualification Not Null"></asp:RequiredFieldValidator>
        </td>
    </tr>

    <tr>
        <td><asp:Button ID="btnUpdate" runat="server"
        Text="Update" onclick="btnUpdate_Click"  /></td>
        <td><asp:Button ID="btnreset" runat="server" 
        Text="Reset" onclick="btnreset_Click"  /></td>
    </tr>
</table>